package com.zerogis.zpubuidzmb;

import com.zerogis.zcommon.pub.ApplicationBase;
import com.zerogis.zpubdb.engine.DataSoucreEngineConstant;
import com.zerogis.zpubdb.engine.DataSourceEngine;
import com.zerogis.zpubuidzmb.fragment.TestDzmbApplicationBase;
import com.zerogis.zpubuidzmb.fragment.TestQueryApplicationBase;

/**
 * 类描述：
 * 作者：郑朝军 on 2018/7/31
 * 邮箱：1250393285@qq.com
 * 公司：武汉智博创享科技有限公司
 * 修改人：郑朝军 on 2018/7/31
 * 修改备注：
 */
public class TestApplication extends ApplicationBase
{
    private DataSoucreEngineConstant m_dataSourceEngine;// 数据源

    private static TestApplication m_Instance;

    @Override
    public void onCreate()
    {
        super.onCreate();
        m_Instance = this;
        m_dataSourceEngine = new DataSourceEngine(this, true);

        TestDzmbApplicationBase applicationBase = new TestDzmbApplicationBase();
        applicationBase.onCreate();

        TestQueryApplicationBase queryApplicationBase = new TestQueryApplicationBase();
        queryApplicationBase.onCreate();
    }

    public static TestApplication getInstance()
    {
        if (m_Instance == null)
        {
            m_Instance = new TestApplication();
        }
        return m_Instance;
    }

    public DataSoucreEngineConstant getDataSourceEngine()
    {
        return m_dataSourceEngine;
    }
}
